# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=sipffer
pkgver=29.efc3ff1
pkgrel=1
epoch=1
groups=('blackarch' 'blackarch-sniffer' 'blackarch-voip')
pkgdesc='SIP protocol command line sniffer.'
arch=('x86_64' 'aarch64')
url='https://github.com/xenomuta/SIPffer'
license=('GPL3')
depends=('libpcap' 'pcre')
makedepends=('git')
source=("$pkgname::git+https://github.com/xenomuta/SIPffer.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

